import React, { Component } from "react";
import Item from "../Item/Item";

export default class List extends Component {
  render() {
    const { updateHandler, todoList, deleteHandler } = this.props;
    return (
      <ul>
        {todoList.map((item) => (
          <Item
            key={item.id}
            deleteHandler={deleteHandler}
            updateHandler={updateHandler}
            item={item}
          />
        ))}
      </ul>
    );
  }
}
